package org.shushan.cloud.lock.sample.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import org.shushan.cloud.lock.sample.entity.MybatisTest;
import org.shushan.framework.core.mapstruct.ReqMapstruct;
import org.shushan.framework.core.page.Request;

import java.io.Serializable;
import java.util.Date;

/**
 * (TUser)请求实体
 * @author zhigang.li
 * @email 2429967859@qq.com
 * @since 2023-09-16 22:25:41
 */
@Getter
@Setter
@Schema(name = "MybatisTestDto")
public class MybatisTestDto implements ReqMapstruct<MybatisTest>,Serializable, Request<Long> {
    private static final long serialVersionUID = -89789232999208001L;
    @Schema(name = "id")
    private Long id;
    private String username;
    private String creator;
    private String modifier;
    private Integer delFlag;
    private Date createTime;
    private Date modifyTime;
    private String phone;
    private String address;
    private String sex;

    @Override
    public MybatisTest toEn() {
        return TUserDtoMapper.INSTANCE.toEn(this);
    }

    @Mapper
    interface TUserDtoMapper {
        TUserDtoMapper INSTANCE = Mappers.getMapper(TUserDtoMapper.class);
        MybatisTest toEn(MybatisTestDto mybatisTestDto);
    }
}

